package demo.issuetracker.entity.service;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import demo.issuetracker.dao.IssueDao;
import demo.issuetracker.entity.Issue;

@Component
public class IssueService {
    private Log log = LogFactory.getLog(this.getClass());

    @Resource(name = "issueDao")
    private IssueDao issueDao;

    private static IssueService instance;

    @PostConstruct
    public void init() {
        // initialize with some initial data
        // Issue issue = issueDao.newInstance();
        
        // issue.setId("");
        // issue.setTitle("");
        // issue.setDescription("");
        // issue.setPriority("");
        // issue.setAssignee("");
        // issue.setOwner("");
        // issue.setEnvironment("");
        // issue.setAttachment("");
        // issueDao.create(issue);

        instance = this;
    }

    public IssueDao getIssueDao() {
        return this.issueDao;
    }
    
    public static IssueService getInstance() {
        return instance;
    }
}// clickframes::version=1567625618::clickframes